<link href="__STATIC__/admin/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<div class="row">
    <div class="col-md-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">文章列表</h3>
            </div>
            <div class="box-body table-responsive">
                <table id="example2" class="table table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>文章ID</th>
                        <th>文章标题</th>
                        <th>添加时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="article"  id="v"}
                        <tr>
                            <td>{$v['article_id']}</td>
                            <td>{$v.article_title}</td>
                            <td>{$v.add_time|date='Y-m-d H:i:s',###}</td>
                            <td>{[<a href="{:url('admin/Category/editArticle',array('cid'=>$v['cid']))}">修改</a>]}
                                {[<a href="javascript:void(0);" cid="{$v['cid']}" onclick="deleteCategory(this)">删除</a>]}
                            </td>

                        </tr>
                    {/volist}


                </table>
                <div class="text-center">{$page}</div>
            </div>
        </div>
    </div>
</div>
<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script>
    function  deleteCategory(obj){
        $.ajax({
            url:"{:url('admin/Category/deleteCategory')}",
            data:{'cid':$(obj).attr('cid')},
            type:"post",
            datatype:'json',
            success:function(d){
                alert(d.msg);
                $(obj).parent().parent().remove();
            }

        })
    }
</script>